package com.sqj.singletonPattern.threadLocal;

public class ThreadLocalSingelton {
    private static final ThreadLocal<ThreadLocalSingelton> threadLocalInstance=new ThreadLocal(){
        @Override
        protected Object initialValue() {
            return new ThreadLocalSingelton();
        }
    };

    private ThreadLocalSingelton(){}

    public static ThreadLocalSingelton getInstance(){
        return threadLocalInstance.get();
    }
}
